﻿package net.wangit.jdbc.database;

import net.wangit.util.StringUtil;

public class Informix9 extends Informix {

	public Informix9() {
	}

	public String getIdentityColumnString() {
		return "SERIAL8 NOT NULL";
	}

	public boolean hasDataTypeInIdentityColumn() {
		return false;
	}

	public String getAddForeignKeyConstraintString(String constraintName,
			String foreignKey[], String referencedTable, String primaryKey[]) {
		return (new StringBuffer(30)).append(" add constraint ").append(
				" foreign key (").append(StringUtil.join(", ", foreignKey))
				.append(") references ").append(referencedTable).append(
						" constraint ").append(constraintName).toString();
	}

	public String getAddPrimaryKeyConstraintString(String constraintName) {
		return (new StringBuilder(" add constraint primary key constraint "))
				.append(constraintName).append(" ").toString();
	}
}
